/**
 * 共享设置
 * 
 * @param {}
 *            manager
 */
function sharedset(grid, tp) {
	var oid, oname, otype, otname, title;

	//var grid = manager.getGridList();
	var m = grid.getSelectionModel().getSelections();
	for (var i = 0, len = m.length; i < len; i++) {
		// ids.push(m[i].get('objid'));

		if (i == 0) {
			oid = m[i].get('objid');
			oname = m[i].get('filename');
			otype = m[i].get('objkey');

			if (m[i].get('objkey') == 'FOLDER') {
				otname = 'DOC_HGBGODKQXB';
			} else if (m[i].get('objkey') == 'FILEINFO') {
				otname = 'DOC_BVFABRYJMQ';
			}

		} else {
			oid += ',' + m[i].get('objid');
			oname += ',' + m[i].get('filename');
			otype += ',' + m[i].get('objkey');

			if (m[i].get('objkey') == 'FOLDER') {
				otname += ',DOC_HGBGODKQXB';
			} else if (m[i].get('objkey') == 'FILEINFO') {
				otname += ',DOC_BVFABRYJMQ';
			}
		}
	}

	var plist;
	
	var title = '';

	if (tp == 'file') {
		plist = purviewList4multi(oid, oname, otype, otname, 'purview-handle',
				'');
		title = '文件<'+oname+'>共享设置';		
	} else if (tp == 'folder') {
		plist = purviewList4Folder(oid, oname, otype, otname, 'purview-handle',
				'');
		title = '文件夹<'+oname+'>共享设置';			
	} else if (tp == 'remix') {
        plist = purviewList4Remix(oid, oname, otype, otname, 'purview-handle',
				'');
		title = '<'+oname+'>共享设置';		
	}

	var win = new Ext.Window({
				renderTo : Ext.getBody(),
				layout : 'fit',
				width : 600,
				height : 400,
				title : Ext.util.Format.htmlEncode(title),
				resizable : false,
				plain : true,
				modal : true,

				items : [plist]
			});

	win.show(this);
}